import request from '@/utils/request'

export function getList(data) {
  return request({
    url: '/erp/admin/order/list',
    method: 'get',
    params:data
  })
}

export function auditOrders(data) {
  return request({
    url: '/erp/order/audit',
    method: 'put',
    data
  })
}

export function updateDeliveryDate(data) {
  return request({
    url: '/erp/admin/order/deliveryDate',
    method: 'put',
    data
  })
}


//删除订单
export function doDelete(data) {
  return request({
    url: '/erp/admin/order/' + data,
    method: 'delete',
  })
}

//更新订单导出状态
export function doUpdateExportStatus(data) {
  return request({
    url: '/erp/admin/order/updateExportStatus',
    data,
    method: 'post',
  })
}

//删除订单明细
export function doDeleteOrderDetails(data) {
  return request({
    url: '/erp/admin/order/details',
    method: 'delete',
    data
  })
}


export function doUpdateOrderDetail(data){
  return request({
    url: '/erp/admin/order/details',
    method: 'put',
    data
  })
}

//更新订单备注信息
export function updateOrderMemo(data){
  return request({
    url: '/erp/admin/order/orderMemo',
    method: 'put',
    data
  })
}

//更新订单物流信息
export function updateOrderWuliu(data){
  return request({
    url: '/erp/admin/order/orderWuliu',
    method: 'put',
    data
  })
}

export function exportXls(data) {
  return request({
    url: '/erp/admin/order/export',
    method: 'get',
    params:data
  })
}
